<template>
  <div>
    <div class="title_box">
      <p class="title">营业执照信息</p>
      <div class="line"></div>
    </div>

    <table class="ent_table" border="0">
      <tr>
        <td class="table_left">企业名称</td>
        <td class="ent_table_title">{{ entinfo.name }}</td>
        <td class="table_left">法定代表人</td>
        <td class="ent_table_title">{{ entinfo.legal }}</td>
      </tr>
      <tr>
        <td class="table_left">类型</td>
        <td class="ent_table_title">{{ getTraditionalName(entinfo.industry) }}</td>
        <td class="table_left">注册号/统一社会信用代码</td>
        <td class="ent_table_title">{{ entinfo.code }}</td>
      </tr>
      <tr>
        <td class="table_left">注册资金</td>
        <td class="ent_table_title">
          {{ entinfo.registeredCapital ? `${entinfo.registeredCapital} 万元` : '' }}
        </td>
        <td class="table_left">成立日期</td>
        <td class="ent_table_title">{{ entinfo.incorporationDate }}</td>
      </tr>
      <tr>
        <td class="table_left">企业地址</td>
        <td colspan="3" class="ent_table_title">
          {{ entinfo.address }}
        </td>
      </tr>
      <!-- <tr>
              <th class="table_left">企业地址</th>
              <th colspan="3" class="ent_table_title">深圳市龙华区龙华大道549号绿景公馆1866南区旁</th>
            </tr> -->
      <tr>
        <td class="table_left">经营范围</td>
        <td colspan="3" class="ent_table_title text_area">
          {{ entinfo.natureBusiness }}
        </td>
      </tr>
    </table>
  </div>
</template>
<script>
import { getClientUseCompanyInfo } from "@/apis/com/company";
export default {
  props: {
    category: {
      default: [],
      type: Array
    }
  },
  created () {
    this.entId = this.$route.query.id;
    this.getentBaseInfo()
  },
  data () {
    return {
      entinfo: {}
    }
  },
  methods: {
    getTraditionalName (dictValue) {
      console.log('this.category', this.category);

      return this.category.find(item => item.dictValue == dictValue)?.dictLabel
    },
    //获取企业基本信息
    getentBaseInfo () {
      getClientUseCompanyInfo(this.entId)
        .then((res) => {
          console.log("企业基本信息");
          console.log(res);
          if (res.code == 200) {
            this.entinfo = res.data;
          }
        })
        .catch((error) => { });
    },

  }
}

</script>
<style lang="less" scoped>
.title_box {
  border-bottom: solid 1px #ebeef5;

  .title {
    font-size: 16px;
    line-height: 14px;
    letter-spacing: 0px;
    color: #303133;
  }

  .line {
    width: 20px;
    height: 4px;
    background-color: #188af1;
    margin-top: 8px;
  }
}

.ent_table {
  width: 100%;
  margin-top: 24px;

  .table_left {
    width: 196px;
    height: 38px;
    background-color: #f3f6fe;
    padding-left: 20px;
    color: #606266;
    border-bottom: 1px solid #e4e7ed;
  }

  .ent_table_title {
    background-color: #fff;
    padding-left: 20px;
    color: #333333;
    border-bottom: 1px solid #e4e7ed;
  }

  .text_area {
    line-height: 24px;
    padding: 16px 20px;
  }
}

::v-deep .ant-table-thead>tr>th,
.ant-table-tbody>tr>td {
  padding: 8px 16px;
}

::v-deep .ant-table-thead>tr>th {
  background: #f3f6fe;
  border-bottom: 1px solid #e4e7ed;
}
</style>